package com.ljx.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName u_collection
 */
@TableName(value ="u_collection")
@Data
@ApiModel("收藏信息表")
public class Collection implements Serializable {
    /**
     * 
     */
    @TableId
    @ApiModelProperty(name = "id",value = "收藏id", dataType = "String")
    private String id;

    /**
     * 用户id
     */
    @ApiModelProperty(name = "uid",value = "用户id", dataType = "String")
    private String uid;

    /**
     * 商家id
     */
    @ApiModelProperty(name = "bid",value = "商家id", dataType = "String")
    private String bid;

    /**
     * 商品id
     */
    @ApiModelProperty(name = "goodsid",value = "商品id", dataType = "String")
    private String goodsid;

    /**
     * 收藏类型 0商家 1商品
     */
    @ApiModelProperty(name = "status",value = "收藏类型 0商家 1商品", dataType = "Integer")
    private Integer status;

    /**
     * 逻辑删除列
     */
    @ApiModelProperty(name = "isDeleted",value = "逻辑删除列", dataType = "Integer")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Collection other = (Collection) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getGoodsid() == null ? other.getGoodsid() == null : this.getGoodsid().equals(other.getGoodsid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getGoodsid() == null) ? 0 : getGoodsid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", bid=").append(bid);
        sb.append(", goodsid=").append(goodsid);
        sb.append(", status=").append(status);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}